reflex-web CI uses local reflex version#6298
Conversation
Remove version spec from reflex-dev/reflex git URLs in reflex-web pyproject.toml
Greptile SummaryThis PR updates the Key changes:
Confidence Score: 5/5Safe to merge — the primary Ubuntu CI path is correctly implemented and all remaining findings are P2 style suggestions. Both findings are P2: one is a forward-compatibility gap in a regex (no current packages affected) and the other is a missing verification step in a secondary job that only runs post-merge on main. Neither blocks the intended behavior of this PR. No files require special attention; Important Files Changed
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant UV as uv (local reflex)
participant SFW as Socket.dev Firewall
participant RW as reflex-web pyproject.toml
GH->>UV: uv sync (installs local PR reflex)
GH->>RW: Clone reflex-dev/reflex-web
GH->>RW: sed strip reflex-dev/reflex git URLs
Note over RW: "pkg @ git+https://.../reflex@ref" → "pkg"
GH->>SFW: sfw uv pip compile pyproject.toml
SFW-->>GH: requirements.txt (all direct deps)
GH->>GH: Filter already-installed packages
Note over GH: grep -ivf installed_patterns.txt
GH->>SFW: sfw uv pip install -r requirements.txt
GH->>UV: Verify installed version ends with +HEAD_SHA
UV-->>GH: ✅ version matches checkout
|
| working-directory: ./reflex-web | ||
| run: | | ||
| # Replace reflex-dev/reflex git deps with plain package names (PR version is pre-installed) | ||
| sed -i -E 's|"([a-zA-Z0-9_-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml |
There was a problem hiding this comment.
sed regex excludes dots from package name character class
The capture group [a-zA-Z0-9_-]+ does not include ., which is a valid character in Python distribution names per PEP 508. No reflex-dev/reflex packages currently use dots in their names, but if one ever does (e.g. a namespaced package), this substitution would silently fail to strip the git URL, causing uv pip compile to resolve the pinned remote version instead of the locally-installed PR version.
Consider widening the character class to [a-zA-Z0-9_.-]+:
| sed -i -E 's|"([a-zA-Z0-9_-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml | |
| sed -i -E 's|"([a-zA-Z0-9_.-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml |
Remove version spec from reflex-dev/reflex git URLs in reflex-web pyproject.toml